package com.aidex.biz.service.impl;

import java.util.List;
import com.aidex.common.annotation.DataScope;
import com.github.pagehelper.PageInfo;
import com.aidex.common.core.domain.entity.SysUser;
import com.aidex.common.core.domain.entity.SysDept;
import com.aidex.common.core.service.BaseServiceImpl;
import com.aidex.framework.cache.DeptUtils;
import com.aidex.framework.cache.UserUtils;
import org.springframework.stereotype.Service;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.aidex.biz.mapper.RxkOrderMapper;
import com.aidex.biz.domain.RxkOrder;
import com.aidex.biz.service.RxkOrderService;
import org.springframework.transaction.annotation.Transactional;
import com.aidex.common.utils.NumberUtils;

/**
 * 融享客客户订单Service业务层处理
 * @author sean
 * @email 2074844820@qq.com
 * @date 2024-05-30
 */
@Service
@Transactional(readOnly = true)
public class RxkOrderServiceImpl extends BaseServiceImpl<RxkOrderMapper, RxkOrder> implements RxkOrderService
{
    private static final Logger log = LoggerFactory.getLogger(RxkOrderServiceImpl.class);

    /**
     * 获取单条数据
     * @param rxkOrder 融享客客户订单
     * @return 融享客客户订单
     */
    @Override
    public RxkOrder get(RxkOrder rxkOrder)
    {
        RxkOrder dto = super.get(rxkOrder);
        return dto;
    }

    /**
     * 获取单条数据
     * @param id 融享客客户订单id
     * @return 融享客客户订单
     */
    @Override
    public RxkOrder get(String id)
    {
        RxkOrder dto = super.get(id);
        return dto;
    }


    /**
     * 查询融享客客户订单列表
     * @param rxkOrder 融享客客户订单
     * @return 融享客客户订单
     */
    @Override
    @DataScope(userAlias = "a",deptAlias = "a")
    public List<RxkOrder> findList(RxkOrder rxkOrder)
    {
        return super.findList(rxkOrder);
    }

    /**
     * 分页查询融享客客户订单列表
     * @param rxkOrder 融享客客户订单
     * @return 融享客客户订单
     */
    @Override
    @DataScope(userAlias = "a",deptAlias = "a")
    public PageInfo<RxkOrder> findPage(RxkOrder rxkOrder)
    {
        return super.findPage(rxkOrder);
    }

    /**
     * 保存融享客客户订单
     * @param rxkOrder
     * @return 结果
     */
    @Override
    public boolean save(RxkOrder rxkOrder)
    {
        return super.save(rxkOrder);
    }


    /**
     * 删除融享客客户订单信息
     * @param rxkOrder
     * @return 结果
     */
    @Override
    public boolean remove(RxkOrder rxkOrder)
    {
        return super.remove(rxkOrder);
    }

    /**
     * 批量删除融享客客户订单
     * @param ids 需要删除的融享客客户订单ID
     * @return 结果
     */
    @Transactional(readOnly = false)
    @Override
    public int deleteRxkOrderByIds(String[] ids)
    {
        return mapper.deleteRxkOrderByIds(ids);
    }

    /**
     * 获取最大编号
     * @param rxkOrder 融享客客户订单
     * @return 结果
     */
    @Override
    public int findMaxSort(RxkOrder rxkOrder)
    {
        return NumberUtils.nextOrder(mapper.findMaxSort(rxkOrder));
    }

    public RxkOrder findListByStatus(RxkOrder rxkOrder){
        return mapper.findListByStatus(rxkOrder);
    }
}
